package org.syyo.admin.utils;

import org.syyo.admin.common.enums.ResultEnum;
import org.syyo.admin.domain.ResultVo;

/**
 * @Auther: wangzhong
 * @Date: 2020/1/8 16:17
 * @Description: 封装的返回工具类
 */
public class ResultUtils {

    public static ResultVo response(Object obj){
        ResultVo<Object> resultVo = new ResultVo<>();
        resultVo.setData(obj);
        resultVo.setCode(ResultEnum.OK.getCode());
        resultVo.setMessage(ResultEnum.OK.getMessage());
        return resultVo;
    }
}
